﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication2.WebForm1" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>本机数据库--分页数据测试</title>
</head>
<body>
    <form id="form1" runat="server">
    <div style="width: 1200px; height: auto;">
        <asp:ScriptManager runat="server" />
        <asp:UpdatePanel runat="server" ID="UpdatePanel1">
            <ContentTemplate>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:DropDownList runat="server" ID="ddlschoolProvince" AutoPostBack="true" OnSelectedIndexChanged="ddlschoolProvince_SelectedIndexChanged">
                    <asp:ListItem Text="请选择省份" Value="0" />
                </asp:DropDownList>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:DropDownList ID="ddlschoolName" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlschoolName_OnSelectedIndexChanged"
                    Enabled="false">
                    <asp:ListItem Text="请选择学校" Value="0" />
                </asp:DropDownList>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnSelectAll" runat="server" Text="全选" OnClick="btnSelectAll_Click" />
                &nbsp;<asp:GridView runat="server" ID="gvTeacher" AutoGenerateColumns="False" PageSize="15"
                    BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px"
                    EnableViewState="false" ViewStateMode="Disabled" Style="width: 1200px; height: auto;"
                    CellPadding="3" ForeColor="Black" GridLines="Vertical" OnRowDataBound="gvTeacher_RowDataBound">
                    <AlternatingRowStyle BackColor="#CCCCCC" />
                    <Columns>
                        <asp:BoundField HeaderText="序号">
                            <HeaderStyle HorizontalAlign="Center" Width="4%" />
                            <ItemStyle HorizontalAlign="Center" Width="4%" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="全选">
                            <ItemTemplate>
                                <input id="chkItem" type="checkbox" name="chkItem" runat="server" />
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="6%" />
                            <ItemStyle HorizontalAlign="Center" Width="6%" />
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="作者姓名" DataField="authorName">
                            <HeaderStyle HorizontalAlign="Center" Width="8%" />
                            <ItemStyle HorizontalAlign="Center" Width="8%" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="所在学院" DataField="department">
                            <HeaderStyle HorizontalAlign="Center" Width="20%" />
                            <ItemStyle HorizontalAlign="Center" Width="20%" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="学校名称" DataField="schoolName">
                            <HeaderStyle HorizontalAlign="Center" Width="15%" />
                            <ItemStyle HorizontalAlign="Center" Width="15%" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="作者单位" DataField="unit">
                            <HeaderStyle HorizontalAlign="Center" Width="20%" />
                            <ItemStyle HorizontalAlign="Center" Width="20%" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="作者ID" DataField="authorID">
                            <HeaderStyle HorizontalAlign="Center" Width="8%" />
                            <ItemStyle HorizontalAlign="Center" Width="8%" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="学校ID" DataField="schoolID">
                            <HeaderStyle HorizontalAlign="Center" Width="8%" />
                            <ItemStyle HorizontalAlign="Center" Width="8%" />
                        </asp:BoundField>
                    </Columns>
                    <FooterStyle BackColor="#CCCCCC" />
                    <HeaderStyle BackColor="#aa11ff" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#808080" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#383838" />
                </asp:GridView>
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CustomInfoHTML="总记录数:%RecordCount%, 总页数:%PageCount%, 当前为第  %CurrentPageIndex% 页"
                    FirstPageText="首页" LastPageText="末页" LayoutType="Table" NextPageText="下一页" NumericButtonCount="15"
                    PageIndexBoxType="DropDownList" PageSize="10" PrevPageText="上一页" ShowNavigationToolTip="true"
                    PagingButtonSpacing="8px" ShowCustomInfoSection="Right" OnPageChanged="AspNetPager1_PageChanged"
                    Font-Size="13pt" HorizontalAlign="Center" Width="100%" AlwaysShow="True" CustomInfoSectionWidth="60%">
                </webdiyer:AspNetPager>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
